Embedded Programming



Install cores so that the microcontroller can be compatible with Arduino Image
First go to SpenceKonde's repository at github, scroll down to find the installation and click on it
Copy the URL
Open Arduino --> files --> Prefrence
Paste the URL in the additional board manager URLs
Go Tools --> Board Manager
Search "megaTinyCore" and install the one that is by SpenceKonde
Change the following settings
We need to take note of which arduino pin the LED and push button is by refering to the pin out diagram

Coding


Push Button Pin 1
LED Pin 0
This code is program in a way that the LED will start flashing whenever the push button is being pressed. The the void loop() first the led is set to HIGH than a delay of 500ms than changed to LOW

Make sure when uploading the program we need to use Sketch --> "Upload Using Programmer"

Error I faced:

There was a short between Vcc & UPDI pin but once the Vcc & UPDI pin separated the board was okay


A video of the "Hello Board" after the error was fixed